package pe.gob.inei.sirtod.domain;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedNativeQueries;
import javax.persistence.NamedNativeQuery;

@Entity
@NamedNativeQueries({
		@NamedNativeQuery(name = "Anio.findDatoAnualDep", query = "SELECT D.ANIO "
				+ "FROM SIDIN_CONSULTA.DATO_ANUAL_DEP D WHERE D.INDICADOR_id IN(:lisIndSel) "
				+ "GROUP BY D.ANIO ORDER BY D.ANIO", resultClass = Anio.class),
		@NamedNativeQuery(name = "Anio.findDatoMensualDep", query = "SELECT D.ANIO "
				+ "FROM SIDIN_CONSULTA.DATO_MENS_DEP D WHERE D.INDICADOR_id IN(:lisIndSel) "
				+ "GROUP BY D.ANIO ORDER BY D.ANIO", resultClass = Anio.class),
		@NamedNativeQuery(name = "Anio.findDatoTrimestralDep", query = "SELECT D.ANIO "
				+ "FROM SIDIN_CONSULTA.DATO_TRIM_DEP D WHERE D.INDICADOR_id IN(:lisIndSel) "
				+ "GROUP BY D.ANIO ORDER BY D.ANIO", resultClass = Anio.class),
		@NamedNativeQuery(name = "Anio.findDatoSemestralDep", query = "SELECT D.ANIO "
				+ "FROM SIDIN_CONSULTA.DATO_SEM_DEP D WHERE D.INDICADOR_id IN(:lisIndSel) "
				+ "GROUP BY D.ANIO ORDER BY D.ANIO", resultClass = Anio.class),
		@NamedNativeQuery(name = "Anio.findDatoTrimestralMovilDep", query = "SELECT D.ANIO "
				+ "FROM SIDIN_CONSULTA.DATO_TRIM_MOVIL_DEP D WHERE D.INDICADOR_id IN(:lisIndSel) "
				+ "GROUP BY D.ANIO ORDER BY D.ANIO", resultClass = Anio.class) })
@SuppressWarnings("serial")
public class Anio implements Serializable {

	@Id
	private String anio;

	public String getAnio() {
		return anio;
	}

	public void setAnio(String anio) {
		this.anio = anio;
	}
}